<?xml version = '1.0' encoding = 'UTF-8'?>
<HBRRepo><variables/><rulesets/><rules><rule id="1" name="Commission Calculation" product="Planning"><property name="application">SalesPln</property><property name="plantype">OEP_QTP</property><script type="groovy">'''
/*SET updatecalc off;
SET createblockoneq on;*/

FIX(&amp;OEP_CurYr,"OEP_Plan","No Entity","No Accounts","USD","Version A","Version B","Version C","No Product","BegBalance")
   FIX(@DESCENDANTS("All Bands"))
      Commission
      /*Tier 1 Commission*/
      (IF("% Attainment" > "Lower Bound"->"Tier 1" and "% Attainment" &lt; "Upper Bound"->"Tier 1")
         Commission = Headcount * "% Attainment" * "Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 1"+"Bonus Amount"->"Tier 1";
      /*Tier 2 Commission*/
      ELSEIF("% Attainment" > "Lower Bound"->"Tier 2" and "% Attainment" &lt; "Upper Bound"->"Tier 2")
         Commission = ("% Attainment" - "Upper Bound"->"Tier 1") * Headcount *"Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 2"+"Bonus Amount"->"Tier 2" + "Upper Bound"->"Tier 1" * Headcount *"Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 1";
      /*Tier 3 Commission*/
      ELSEIF("% Attainment" > "Lower Bound"->"Tier 3")
         Commission = ("% Attainment" - "Lower Bound"->"Tier 3") * Headcount *"Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 3"+"Bonus Amount"->"Tier 3"+
         ("% Attainment" - "Upper Bound"->"Tier 2") * Headcount *"Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 2" + "Upper Bound"->"Tier 1" * Headcount *"Quota per Headcount"->"No Tier"->"YearTotal"*"Commission Rate"->"Tier 1";
      ENDIF
      )
   ENDFIX
ENDFIX
'''</script></rule></rules><components/><deployobjects><deployobject product="2" application="salespln" plantype="oep_qtp" obj_id="1" obj_type="1" name="COMMISSION CALCULATION"/></deployobjects></HBRRepo>